﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RJ.Objects.GameEngine
{

    public abstract class GamePlayer : GameObject
    {
        // private vars
        protected GameState game;
        protected PlayerType type;
        public PlayerType PlayerType
        {
            get { return type; }
            set { type = value; }
        }

        protected AI intelligence;
        public Sprite sprite;


        public GamePlayer(GameState game, PlayerType type, Sprite sprite)
            : this(game, type, AI.Dumb, sprite) { }

        public GamePlayer(GameState game, PlayerType type, AI ai, Sprite sprite)
        {
            this.game = game;
            this.type = type;
            intelligence = ai;
            this.sprite = sprite;
        }

        public override void Update(double gameTime, double elapsedTime)
        {
            // in this case there is nothing to update with the player
        }

        public override void Draw(System.Drawing.Graphics g)
        {
            // there may be cases where a player draws something on screen
            if (sprite != null)
                sprite.Draw(g);
        }
    }

    public enum PlayerType
    {
        Human,
        Computer
    }

    public enum AI
    {
        Dumb,
        Average,
        Smart
    }
}
